package com.jn.news.model;

public class RespDto<T> {
    /**
     * 通用 API 响应封装类
     *
     * @param <T> 数据类型
     */

        private T result;
        private boolean success;
        private String message;
        private int code;
        private int error_code;

    public int getError_code() {
        return error_code;
    }

    // 可选：如果后端返回的是列表，也可以支持
        private int total; // 如分页总数

        // Getters and Setters


    public T getResult() {
        return result;
    }

    public boolean isSuccess() {
            return success;
        }

        public void setSuccess(boolean success) {
            this.success = success;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public int getTotal() {
            return total;
        }

        public void setTotal(int total) {
            this.total = total;
        }



}
